//package com.ruoyi.system.utils;
//
//import com.alibaba.excel.EasyExcel;
//import com.ruoyi.system.vo.Base64ToFileUtil;
//import com.ruoyi.system.vo.req.FileImportDTO;
//
//
//import java.io.IOException;
//import java.util.List;
//
///**
// * <p>
// *
// * </p>
// *
// * @author huangkx @net.sy
// * @since 2024-06-03  00:12
// */
//public class ExcelImportUtil {
//
//
//    /**
//     * 获取Excel数据
//     * @param fileImportDTO
//     * @param excelClass
//     * @param errorList
//     * @return
//     */
//    public <T> List<T> getExcelDataByFile(FileImportDTO fileImportDTO, Class<T> excelClass, List<IntiiinonReqDTO> errorList) throws IOException, IllegalAccessException {
//        //获取数据
//        List<T> excelData = EasyExcel
//                .read(Base64ToFileUtil.base64ToMultipart(fileImportDTO.getExcelFileBase64()).getInputStream())
//                .head(excelClass)
//                .sheet()
//                .doReadSync();
////
////        //获取字典数据
////        Map<Field, Map<String, String>> fieldDicMap = new HashMap<>(excelClass.getDeclaredFields().length);
////        for (Field field : excelClass.getDeclaredFields()){
////            DataDictionary dic = field.getAnnotation(DataDictionary.class);
////            if (dic != null){
////                fieldDicMap.put(field, dicPrceUtil.getDicMapForValue(dic.value()));
////            }
////        }
////
////        //替换字典数据
////        for (T dto : excelData){
////            for (Field field : fieldDicMap.keySet()){
////                ReflectionUtils.makeAccessible(field);
////                String dicCode = String.valueOf(field.get(dto));
////                String value = fieldDicMap.get(field).get(dicCode);
////                field.set(dto, value);
////            }
////        }
//        return excelData;
//    }
//}
